package info.lvcoffee.ethernethelper;

import java.util.HashMap;
import java.util.Map;
import java.util.regex.MatchResult;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Button;
import android.widget.TextView;



public class HelpWeb extends Activity  {
	public  Context mContext;
	public static ProgressDialog waitProgDialog;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.web_page);
        mContext=this;
         
        WebView wv;             
        wv = (WebView) findViewById(R.id.newsWebview);
		wv.getSettings().setJavaScriptEnabled(true);
		
/*		
		//支持local storage
		wv.getSettings().setDomStorageEnabled(true);
		wv.getSettings().setLoadsImagesAutomatically(true);
		String appCachePath = getApplicationContext().getCacheDir().getAbsolutePath();
		wv.getSettings().setAppCachePath(appCachePath);
		wv.getSettings().setAppCacheEnabled(true);
		wv.getSettings().setCacheMode(WebSettings.LOAD_DEFAULT);
		wv.setWebViewClient(new WebViewClient() {        	  
            @Override        
            public boolean shouldOverrideUrlLoading(WebView view, String url)         
            {         
              view.loadUrl(url);                      
              return true;
            }   

            // 加载错误时要做的工作
            public void onReceivedError(WebView view, int errorCode,String description, String failingUrl) 
            {
            //	view.loadUrl("file:///android_asset/error.htm");
            //	waitProgDialog.dismiss();         
            }
            
          });                  
       	*/
		
		wv.loadUrl("file:///android_asset/about.html");
		
        Button backBtn=(Button) findViewById(R.id.btnBack);
        backBtn.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				HelpWeb.this.finish();
			}
		});
    } 
    

}
